<?php
	class menu{
	
		protected $menu_string;
		protected $arrayMenu;
		
		public function showHtml($opcaoMenu){
			
			$this->menu_string = '<div id="menu">
				<ul>';
			$this->montarArray();
			foreach($this->arrayMenu as $i ){
				if($i == $opcaoMenu)
					$this->menu_string.= '<li><a class="itemSelecionado" href="index.php?p='.$i.'">'.$i.'</a></li>';
				else
					$this->menu_string.= '<li><a href="index.php?p='.$i.'">'.$i.'</a></li>';
			}	
			$this->menu_string .= '
			</ul>
			</div>';
			
			return $this->menu_string;
		}
		
		public function montarArray(){
			$this->arrayMenu = array('home','login','cadastro','livros','contato');
		}
	}

?>